home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_apache2.idb / usr / freeware / apache2 / include / apr_version.h.z / apr_version.h
C/C++ Source or Header  |  2002-07-08  |  5KB  |  154 lines

  1. /* ====================================================================
  2.  * The Apache Software License, Version 1.1
  3.  *
  4.  * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
  5.  * reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  *
  11.  * 1. Redistributions of source code must retain the above copyright
  12.  *    notice, this list of conditions and the following disclaimer.
  13.  *
  14.  * 2. Redistributions in binary form must reproduce the above copyright
  15.  *    notice, this list of conditions and the following disclaimer in
  16.  *    the documentation and/or other materials provided with the
  17.  *    distribution.
  18.  *
  19.  * 3. The end-user documentation included with the redistribution,
  20.  *    if any, must include the following acknowledgment:
  21.  *       "This product includes software developed by the
  22.  *        Apache Software Foundation (http://www.apache.org/)."
  23.  *    Alternately, this acknowledgment may appear in the software itself,
  24.  *    if and wherever such third-party acknowledgments normally appear.
  25.  *
  26.  * 4. The names "Apache" and "Apache Software Foundation" must
  27.  *    not be used to endorse or promote products derived from this
  28.  *    software without prior written permission. For written
  29.  *    permission, please contact apache@apache.org.
  30.  *
  31.  * 5. Products derived from this software may not be called "Apache",
  32.  *    nor may "Apache" appear in their name, without prior written
  33.  *    permission of the Apache Software Foundation.
  34.  *
  35.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  36.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  37.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  38.  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  39.  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  40.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  41.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  42.  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  43.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  44.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  45.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  46.  * SUCH DAMAGE.
  47.  * ====================================================================
  48.  *
  49.  * This software consists of voluntary contributions made by many
  50.  * individuals on behalf of the Apache Software Foundation.  For more
  51.  * information on the Apache Software Foundation, please see
  52.  * <http://www.apache.org/>.
  53.  */
  54.  
  55. #ifndef APR_VERSION_H
  56. #define APR_VERSION_H
  57.  
  58. #include "apr.h"
  59.  
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63.  
  64. /**
  65.  * @file apr_version.h
  66.  * @brief 
  67.  * 
  68.  * APR's Version
  69.  *
  70.  * There are several different mechanisms for accessing the version. There
  71.  * is a string form, and a set of numbers; in addition, there are constants
  72.  * which can be compiled into your application, and you can query the library
  73.  * being used for its actual version.
  74.  *
  75.  * Note that it is possible for an application to detect that it has been
  76.  * compiled against a different version of APR by use of the compile-time
  77.  * constants and the use of the run-time query function.
  78.  *
  79.  * APR version numbering follows the guidelines specified in:
  80.  *
  81.  *     http://apr.apache.org/versioning.html
  82.  */
  83.  
  84. /* The numeric compile-time version constants. These constants are the
  85.  * authoritative version numbers for APR. 
  86.  */
  87.  
  88. /** major version 
  89.  * Major API changes that could cause compatibility problems for older
  90.  * programs such as structure size changes.  No binary compatibility is
  91.  * possible across a change in the major version.
  92.  */
  93. #define APR_MAJOR_VERSION       0
  94.  
  95. /** 
  96.  * Minor API changes that do not cause binary compatibility problems.
  97.  * Should be reset to 0 when upgrading APR_MAJOR_VERSION
  98.  */
  99. #define APR_MINOR_VERSION       9
  100.  
  101. /** patch level */
  102. #define APR_PATCH_VERSION       0
  103.  
  104.  
  105. /** 
  106.  *  This symbol is defined for internal, "development" copies of APR. This
  107.  *  symbol will be #undef'd for releases. 
  108.  */
  109. #define APR_IS_DEV_VERSION
  110.  
  111. /** The formatted string of APR's version */
  112. #define APR_VERSION_STRING \
  113.      APR_STRINGIFY(APR_MAJOR_VERSION) "." \
  114.      APR_STRINGIFY(APR_MINOR_VERSION) "." \
  115.      APR_STRINGIFY(APR_PATCH_VERSION) \
  116.      APR_IS_DEV_STRING
  117.  
  118.  
  119. /** 
  120.  * The numeric version information is broken out into fields within this 
  121.  * structure. 
  122.  */
  123. typedef struct {
  124.     int major;
  125.     int minor;
  126.     int patch;
  127.     int is_dev;
  128. } apr_version_t;
  129.  
  130. /**
  131.  * Return APR's version information information in a numeric form.
  132.  *
  133.  *  @param pvsn Pointer to a version structure for returning the version
  134.  *              information.
  135.  */
  136. APR_DECLARE(void) apr_version(apr_version_t *pvsn);
  137.  
  138. /** Return APR's version information as a string. */
  139. APR_DECLARE(const char *) apr_version_string(void);
  140.  
  141.  
  142. /** Internal: string form of the "is dev" flag */
  143. #ifdef APR_IS_DEV_VERSION
  144. #define APR_IS_DEV_STRING "-dev"
  145. #else
  146. #define APR_IS_DEV_STRING ""
  147. #endif
  148.  
  149. #ifdef __cplusplus
  150. }
  151. #endif
  152.  
  153. #endif /* APR_VERSION_H */
  154.